<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions">

    <f:view id="view" contentType="text/html" beforePhase="#{SistemaBean.carregaTemplate()}">

        <h:head>
            <title>SiADWeb - UFRPE</title>
            <meta content='text/html; charset=UTF-8' http-equiv="Content-Type" />
            <link type="text/css" rel="stylesheet"
                  href="#{request.contextPath}/css/default.css" />
            <link type="text/css" rel="stylesheet"
                  href="#{request.contextPath}/syntaxhighlighter/styles/syntaxhighlighter.css" />

            <style type="text/css">
                .ui-widget {
                    font-size: 12px !important;
                    font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
                }
            </style>
            <script type="text/javascript">
                function home1(){
                    document.getElementById("HomeImg").src="/imagens/home2press.png";
                }
                function home2(){
                    document.getElementById("HomeImg").src="/imagens/home2.png";
                }
                
            </script>

        </h:head>
        <h:body>
            <p:ajaxStatus style="width:16px;height:16px;">  
                <f:facet name="start">  
                    <h:graphicImage value="/imagens/ajaxloading.gif" />  
                </f:facet>  

                <f:facet name="complete">  
                    <h:outputText value="" />  
                </f:facet>  
            </p:ajaxStatus>  

            <div id="logo" style="height: 200px;">
                <h:graphicImage style="height: 157px; max-width: 1400; width: 100%; overflow: none" value="/imagens/topo.png" />
                <div Class="ui-widget-header" style="height: 38px;">
                    <div style="float: left; padding-top: 5px; vertical-align: middle;width: 80px;" class="ui-widget"> 
                    </div>
                    <div style="float: left; padding-top: 7px; vertical-align: middle;" class="ui-widget">  
                        <a href="#{request.contextPath}/index.faces"><h:graphicImage value="/imagens/home2.png" id="HomeImg" onmousemove="home1()" onmouseout="home2()" title="Ir para página principal" style="border: 0"/></a>
                    </div>
                    <div style="float: right; margin-left: 10px;">
                        <h:form >
                            <p:menubar style="float: right; width: 50px;height: 29px;"
                                       styleClass="ui-widget-header" autoSubmenuDisplay="false">
                                <p:menuitem value="Sair" action="#{SistemaBean.logoff}"
                                            icon="ui-icon ui-icon-close">
                                </p:menuitem>
                            </p:menubar>
                        </h:form>
                    </div>
                    <div style="float: right; padding-top: 11px; color:dimgray;" class="ui-widget">Seja Bem Vindo #{SistemaBean.usuarioLogado.nome}  

                    </div>
                </div>
            </div>
            <div id="page">
                <table align="left">
                    <td style="width: 225px;" height="500" valign="top">
                        <div id="sidebar1"
                             class="ui-widget-content ui-corner-all ui-helper-clearfix sidebar">

                            <h:form style="width:190px;">
                                <p:accordionPanel style="margin-left:0px;" autoHeight="true">
                                    <p:tab title="Cadastros" rendered="#{SistemaBean.perfilLogado.cadastro}">
                                        <p:menu style="width:170px; margin-left:-20px;">
                                            <p:menuitem value="Usuários" rendered="#{SistemaBean.perfilLogado.cadUsuarios}" url ="#{request.contextPath}/Facelets/Cadastros/Usuarios/cadastroUsuarios.faces"/>
                                            <p:menuitem value="Equipamentos" rendered="#{SistemaBean.perfilLogado.cadEquipamentos}" url ="#{request.contextPath}/Facelets/Cadastros/Equipamentos/cadastroEquipamentos.faces"/>
                                            <p:menuitem value="Laboratórios" rendered="#{SistemaBean.perfilLogado.cadLaboratorios}" url ="#{request.contextPath}/Facelets/Cadastros/Laboratorios/cadastroLaboratorios.faces"/>
                                            <p:menuitem value="Reserva de Laboratórios" rendered="#{SistemaBean.perfilLogado.cadReservalaboratorios}" url ="#{request.contextPath}/Facelets/Cadastros/Laboratorios/cadastroReservaLaboratorios.faces"/>
                                            <!--<p:menuitem value="Reserva de Equipamentos" rendered="#{SistemaBean.perfilLogado.cadReservaequipamentos}" url ="#{request.contextPath}/Facelets/Cadastros/Equipamentos/cadastroReservaEquipamentos.faces"/>-->
                                            <p:menuitem value="Emprestimo de Equipamentos" rendered="#{SistemaBean.perfilLogado.cadEmprestimoequipamentos}" url ="#{request.contextPath}/Facelets/Cadastros/Equipamentos/emprestimoEquipamentos.faces"/>
                                            <p:menuitem value="Emprestimo de Laboratórios" rendered="#{SistemaBean.perfilLogado.cadEmprestimolaboratorios}" url ="#{request.contextPath}/Facelets/Cadastros/Laboratorios/emprestimoLaboratorios.faces"/>
                                            <!--<p:menuitem value="Devolução de Equipamentos" rendered="#{SistemaBean.perfilLogado.cadDevolucaoequipamentos}" url ="#{request.contextPath}/Facelets/Cadastros/Equipamentos/devolucaoEquipamentos.faces"/>-->
                                            <!--<p:menuitem value="Devolução de Laboratórios" rendered="#{SistemaBean.perfilLogado.cadDevolucaolaboratorios}" url ="#{request.contextPath}/Facelets/Cadastros/Laboratorios/devolucaoLaboratorios.faces"/>-->
                                            <p:menuitem value="Tipos de Equipamentos" rendered="#{SistemaBean.perfilLogado.cadTipoequipamento}" url ="#{request.contextPath}/Facelets/Cadastros/Tipos/cadastroTipos.faces"/>
                                            <p:menuitem value="Raques" rendered="#{SistemaBean.perfilLogado.cadCadraques}" url ="#{request.contextPath}/Facelets/Cadastros/Racks/cadastroRacks.faces"/>
                                        </p:menu>
                                    </p:tab>
                                    <p:tab title="Consultas" rendered="#{SistemaBean.perfilLogado.consulta}">
                                        <p:menu style="width:170px; margin-left:-20px;">
                                            <p:menuitem value="Equipamentos Cadastrados" rendered="#{SistemaBean.perfilLogado.consEquipamentos}" url ="#{request.contextPath}/Facelets/Consultas/Equipamentos/consultaEquipamentos.faces"/>
                                            <p:menuitem value="Reservas de Laboratórios" rendered="#{SistemaBean.perfilLogado.consReservalaboratorios}" url ="#{request.contextPath}/Facelets/Consultas/Laboratorio/consultaReservaLaboratorios.faces"/>
                                            <p:menuitem value="Reservas de Equipamentos" rendered="#{SistemaBean.perfilLogado.consReservaequipamentos}" url ="#{request.contextPath}/Facelets/Consultas/Equipamentos/consultaReservaEquipamentos.faces"/>
                                            <p:menuitem value="Quadro de Raques" rendered="#{SistemaBean.perfilLogado.consQuadroraques}" url ="#{request.contextPath}/Facelets/Consultas/Rack/consultaRacks.faces"/> 
                                        </p:menu>
                                    </p:tab>
                                    <p:tab title="Manutenção" rendered="#{SistemaBean.perfilLogado.manutencao}">
                                        <p:menu style="width:170px; margin-left:-20px;">
                                            <p:menuitem value="Cópia de Segurança" rendered="#{SistemaBean.perfilLogado.manBackup}" url ="#{request.contextPath}/Facelets/Cadastros/Backup/backup.faces"/>
                                        </p:menu>
                                    </p:tab>
                                </p:accordionPanel>
                            </h:form>
                        </div></td>
                    <td style="width: 100%; height: 100%" valign="top"><ui:insert
                        name="content" /></td>
                </table>

            </div>
            <div id="rodape">
                <div align="right" class="ui-widget" style="padding-right: 60px; height: 40px; text-align: right; float: right; max-width: 1350px; width:100%; background-image: url('#{request.contextPath}/imagens/rodape.png'); background-position: right; padding-top: 10px;">
                    SiAD - Sistema de Apoio Didático © 2011 | <a class="ui-widget" href="http://www.ufrpe.br" target="_blank">UFRPE</a> | <a class="ui-widget" href="http://www.uag.ufrpe.br" target="_blank">UAG</a> | <a class="ui-widget" href="http://projetosiad.blogspot.com/" target="_blank">Ajuda</a> |<a class="ui-widget" href="http://www.projetosiad.blogspot.com/2011/12/siad.html" target="_blank"> Sobre o Sistema </a> | <a class="ui-widget" href="http://www.projetosiad.blogspot.com/2011/11/equipe-de-desenvolvimento.html" target="_blank">Desenvolvedores</a></div>
            </div>
        </h:body>

    </f:view>
</html>
